<template>
  <div class="body">
    <div class="container">

      <!-- 横幅区域 -->
      <section class="banner">
        <div class="banner-content">
          <h2>发现您的理想住所</h2>
          <p>从学生公寓到豪华别墅，我们提供各种类型的房源</p>
          <button class="cta-button">开始搜索</button>
        </div>
      </section>

      <!-- 房源分类 -->
      <section class="categories">
        <h3>房源分类</h3>
        <div class="category-list">
          <div class="category-item">
            <i class="fas fa-building"></i>
            <span>公寓</span>
          </div>
          <div class="category-item">
            <i class="fas fa-home"></i>
            <span>独立屋</span>
          </div>
          <div class="category-item">
            <i class="fas fa-bed"></i>
            <span>卧室</span>
          </div>
          <div class="category-item">
            <i class="fas fa-university"></i>
            <span>学生宿舍</span>
          </div>
        </div>
      </section>

      <!-- 精选房源 -->
      <section class="featured-properties">
        <h3>精选房源</h3>
        <div class="property-list">
          <div class="property-card">
            <img src="https://via.placeholder.com/300x200" alt="Property">
            <div class="property-info">
              <h4>市中心豪华公寓</h4>
              <p class="location"><i class="fas fa-map-marker-alt"></i> 北京市朝阳区</p>
              <p class="description">现代化装修，交通便利，配套设施齐全</p>
              <div class="price">¥4,500/月</div>
              <button class="view-details">查看详情</button>
            </div>
          </div>
        </div>
      </section>

      <!-- 底部区域 -->
      <footer>
        <div class="footer-content">
          <div class="footer-section">
            <h4>Boor 租房商城</h4>
            <p>为您提供最优质的租房体验</p>
          </div>
          <div class="footer-section">
            <h4>联系方式</h4>
            <p><i class="fa fa-phone"></i> 400-123-4567</p>
            <p><i class="fa fa-envelope"></i> info@boor.com</p>
          </div>
          <div class="footer-section">
            <h4>关注我们</h4>
            <div class="social-icons">
              <i class="fab fa-weixin"></i>
              <i class="fab fa-weibo"></i>
              <i class="fab fa-qq"></i>
            </div>
          </div>
        </div>
        <div class="copyright">
          <p>&copy; 2025 Boor 租房商城. 保留所有权利.</p>
        </div>
      </footer>
    </div>
  </div>
</template>

<script>
export default {
  name: 'UserHome'
}
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #000;
  color: #fff;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 头部区域样式 */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeInDown 0.8s ease;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.logo h1 {
  font-size: 24px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-right: 20px;
  cursor: pointer;
  transition: color 0.3s ease;
}

nav ul li:hover {
  color: #99e6ff;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: 25px;
  padding: 5px 15px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  padding: 5px;
  font-size: 14px;
  color: #000;
}

.search-bar button {
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-size: 16px;
  color: #000;
  transition: color 0.3s ease;
}

.search-bar button:hover {
  color: #99e6ff;
}

/* 横幅区域样式 */
.banner {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://via.placeholder.com/1200x400') center/cover;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 30px 0;
  border-radius: 10px;
  animation: fadeIn 1.5s ease;
}

.banner-content h2 {
  font-size: 48px;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner-content p {
  font-size: 20px;
  margin-bottom: 30px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-button {
  background-color: #00b3ff;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 18px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 179, 255, 0.3);
}

.cta-button:hover {
  background-color: #0099cc;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 179, 255, 0.4);
}

/* 房源分类样式 */
.categories {
  margin: 50px 0;
}

.categories h3 {
  font-size: 32px;
  text-align: center;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease;
}

.category-list {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.category-item {
  text-align: center;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin: 10px;
  flex: 1;
  min-width: 150px;
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease;
}

.category-item:hover {
  background-color: rgba(0, 179, 255, 0.2);
  transform: translateY(-5px);
}

.category-item i {
  font-size: 36px;
  color: #00b3ff;
  margin-bottom: 10px;
}

.category-item span {
  font-size: 18px;
  display: block;
}

/* 精选房源样式 */
.featured-properties {
  margin: 50px 0;
}

.featured-properties h3 {
  font-size: 32px;
  text-align: center;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease;
}

.property-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.property-card {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px;
  flex: 1;
  min-width: 300px;
  max-width: 350px;
  transition: all 0.3s ease;
  animation: fadeInUp 1s ease;
}

.property-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 179, 255, 0.3);
}

.property-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.property-info {
  padding: 20px;
}

.property-info h4 {
  font-size: 22px;
  margin-bottom: 10px;
}

.location {
  color: #99e6ff;
  margin-bottom: 10px;
}

.description {
  margin-bottom: 15px;
  color: #ccc;
}

.price {
  font-size: 24px;
  color: #00b3ff;
  font-weight: bold;
  margin-bottom: 15px;
}

.view-details {
  background-color: transparent;
  color: #00b3ff;
  border: 2px solid #00b3ff;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-details:hover {
  background-color: #00b3ff;
  color: #000;
}

/* 底部区域样式 */
footer {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 40px 0;
  margin-top: 50px;
  border-radius: 10px 10px 0 0;
}

.footer-content {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.footer-section {
  flex: 1;
  min-width: 200px;
  margin: 20px;
}

.footer-section h4 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #00b3ff;
}

.footer-section p {
  margin-bottom: 10px;
  color: #ccc;
}

.social-icons i {
  font-size: 24px;
  margin-right: 15px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.social-icons i:hover {
  color: #00b3ff;
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: #999;
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }
  
  nav ul {
    margin: 20px 0;
  }
  
  .banner-content h2 {
    font-size: 32px;
  }
  
  .banner-content p {
    font-size: 16px;
  }
  
  .category-list {
    flex-direction: column;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}
</style>